package com.bw.shoppingmall.timmer;

public class TimeThread extends Thread {
    private TimeHandler handler;
    public TimeThread(TimeHandler handler){
        this.handler = handler;
    }

    @Override
    public void run() {
        super.run();
        for (int i = 0; i < 3; i++) {
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            handler.sendEmptyMessage(0);
        }
        handler.sendEmptyMessage(1);
    }
}
